import "package:flutter/material.dart";

// 接收跳转页面传过来的参数
class ParamsPage extends StatefulWidget {
  final String params; //通过构造函数接收参数
  const ParamsPage({super.key, this.params = ''});
  @override
  State<ParamsPage> createState() => ParamsPageState();
}

class ParamsPageState extends State<ParamsPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('接收参数'),
      ),
      body: Center(
        child: Text("接收参数：${widget.params}"), //widget 表示 ParamsPage
      ),
    );
  }
}
